﻿Imports System.Collections.Generic
Imports System.Data
Imports System.Data.SqlClient

Namespace ThietBiDataSetTableAdapters
    Partial Public Class THIETBI_TRAMTableAdapter
        Inherits Global.System.ComponentModel.Component

        Public Property SelectComand() As SqlCommand()
            Get
                If _commandCollection Is Nothing Then
                    InitCommandCollection()
                End If
                Return _commandCollection
            End Get
            Set(ByVal value As SqlCommand())
                _commandCollection = DirectCast(value, SqlCommand())
            End Set
        End Property

        Public Function FillByWhere(ByVal db As ThietBiDataSet.THIETBI_TRAMDataTable, ByVal whereExp As String) As Integer
            Dim stSelect As String = _commandCollection(0).CommandText
            Try
                _commandCollection(0).CommandText += " where " & whereExp
                Return Me.Fill(db)
            Catch
            Finally
                Me._commandCollection(0).CommandText = stSelect
            End Try
            Return -1
        End Function

        Public Function FillByQuery(ByVal db As ThietBiDataSet.THIETBI_TRAMDataTable, ByVal query As String) As Integer
            Dim stSelect As String = query
            Try
                _commandCollection(0).CommandText = query
                Return Me.Fill(db)
            Catch
            Finally
                Me._commandCollection(0).CommandText = stSelect
            End Try

            Return -1
        End Function
    End Class

    
End Namespace

Partial Public Class ThietBiDataSet

End Class
